package com.wt.controller;

import com.wt.Pojo.User;
import org.springframework.web.bind.annotation.*;

@RequestMapping("user")
@RestController
public class ProviderController {

    @PostMapping
    public String Add(@RequestBody  User user){
        System.out.println("1add---user=="+user);
        return "ok add";
    }

    @DeleteMapping("/{id}")
    public String Del(@PathVariable("id") Integer id){
        System.out.println("1id=="+id);
        return "ok del";
    }


    @PutMapping
    public String Update(@RequestBody  User user){
        System.out.println("1put--user=="+user);
        return "ok upd";
    }


    @GetMapping
    public String Get(String name,Integer age){
        System.out.println("1name=="+name+"   age="+age);
        return "ok get";
    }

}
